]> dgit.raspbian.org Git - gnome-shell.git/commit
st: implement ClutterActorClass.has_accessible()
authorChristian Hergert <chergert@redhat.com>
Sun, 23 Feb 2020 22:08:41 +0000 (14:08 -0800)
committerChristian Hergert <christian@hergert.me>
Mon, 24 Feb 2020 22:20:26 +0000 (22:20 +0000)
commit24a3fd4c4d348fc77cd745ca40b307d60611f40c
tree0e383801109b7451a594d2d8575095b5dcd679b2
parentd9f8e04478b36284272fee4dbef4c6f642903552
st: implement ClutterActorClass.has_accessible()

Implement ClutterActorClass.has_accessible() to ensure that CallyActor does not
recreate accessibles during the removal/destruction of an actor.  This relies
on GNOME/mutter!1083 for the ClutterActorClass.has_accessible virtual function.

Running GNOME Shell for about 30 seconds results in a difference between
the two runs.

Before:

    ALLOCATED      TOTAL    FUNCTION
[   52.2 KiB] [   0.05%]    cally_actor_real_remove_actor
[   36.3 KiB] [   0.04%]      st_widget_get_accessible
[    9.8 KiB] [   0.01%]      atk_gobject_accessible_for_object
[    3.2 KiB] [   0.00%]      g_signal_emit_by_name
[    2.9 KiB] [   0.00%]      clutter_actor_get_children

After:

    ALLOCATED      TOTAL    FUNCTION
[    1.8 KiB] [   0.00%]    cally_actor_real_remove_actor
[    1.1 KiB] [   0.00%]      clutter_actor_get_children
[  659 bytes] [   0.00%]      g_signal_emit_by_name

Obviously 50KiB isn't a huge savings.

Although fixing things to avoid re-entrancy on destruction can be very useful
from a correctness standpoint.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/2263
src/st/st-widget.c